import axiosInstance from "@/tool/Myaxios";
export async function getMajors() {
    return (await axiosInstance.get('/user/major')).data
}
export async function isPhoneExist(phone) {
    return (await axiosInstance.get('/user/phoneExist', {params: {phone}})).data
}
export async function loginApi(account, password){
    return (await axiosInstance.get('/user/login', {params:{account,password}})).data
}
export async function registApi(student){
    return (await axiosInstance.post('/user/register',student)).data
}
export async function changePasswordApi(password){
    return (await axiosInstance.post('/user/updatePassword',password)).data
}
export default {
    getMajors,
    isPhoneExist,
    loginApi,
    changePasswordApi
}
